|
PBL Group 21
|
Public Member Functions | |
| __init__ (self) | |
| getProjectedImageWidth (self) | |
| getDistanceBetweenProjectors (self) | |
| getImageWidth (self) | |
| getImageHeight (self) | |
| getImageName (self) | |
| getSide (self) | |
| getGamma (self) | |
Public Attributes | |
| CONFIG_FILENAME | |
Static Public Attributes | |
| str | CONFIG_FILENAME = "config.json" |
Protected Member Functions | |
| _load_config (self) | |
@brief A helper class for reading configuration values from config.json. @details The class loads parameters only once during initialization and provides getters which will be used by the MainAlphaBlender class. @see main_alpha_blender.py
| config_reader.ConfigReader.__init__ | ( | self | ) |
@brief This is the constructor and this loads config.json into memory if it exists. @details If the JSON file does not exist, default values will be used.
|
protected |
@brief Internal function to load JSON configuration. @details This function opens config.json (if present) and loads settings into a dictionary. For the missing files, this will not raise any error but defaults will be used instead.
| config_reader.ConfigReader.getDistanceBetweenProjectors | ( | self | ) |
@brief This returns the physical distance between projector lenses in centimeters. @details this is used to compute percentage of overlap between the two images. @return return Distance between projectors in float or 0 in case of wrong format. @see main_alpha_blender.py
| config_reader.ConfigReader.getGamma | ( | self | ) |
@brief This returns the gamma value used for mask correction. @details Typical projector gamma is around 2.2. @return return Gamma value in float. @see main_alpha_blender.py
| config_reader.ConfigReader.getImageHeight | ( | self | ) |
@brief this returns the pixel height of the input image. @return return the Pixel height (default 1080) in int. @see main_alpha_blender.py
| config_reader.ConfigReader.getImageName | ( | self | ) |
@brief this returns the file name of the image to process. @return return Input image path in string. @see main_alpha_blender.py
| config_reader.ConfigReader.getImageWidth | ( | self | ) |
@brief this returns the pixel width of the input image. @return return the Pixel width (default 1920) in int. @see main_alpha_blender.py
| config_reader.ConfigReader.getProjectedImageWidth | ( | self | ) |
@brief This returns the physical width of the projected image. @details This is the width of *one* projector's image in centimeters. @return return Projected image width in float or 0 if not found or invalid. @see main_alpha_blender.py
| config_reader.ConfigReader.getSide | ( | self | ) |
@brief This returns which projector side this instance represents. @details Valid values are `"left"` or `"right"`. Defaults to `"left"`. @return return the Blend side in lowercase in string i.e "left" or "right". @see main_alpha_blender.py